package com.example.backend.service;

import com.example.backend.entity.Disease;
import com.example.backend.mapper.DiseaseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiseaseService {

    private DiseaseMapper diseaseMapper;

    @Autowired
    public DiseaseService(DiseaseMapper diseaseMapper)
    {
        this.diseaseMapper = diseaseMapper;
    }

    public List<Disease> getAllDiseases(){
        List<Disease> diseases = diseaseMapper.getAllDiseases();
        return diseases;
    }
}
